<?php

use App\Http\Admin\Controllers\AdminPermissionController;
use Illuminate\Support\Facades\Route;

Route::group(['prefix' => 'permission'], function () {
    // 登录校验
    Route::middleware(['auth:sanctum', 'abilities:admin'])->group(function () {
        Route::post('add', [AdminPermissionController::class, "add"]);
        Route::put('update', [AdminPermissionController::class, "update"]);
        Route::get('info', [AdminPermissionController::class, "info"]);
        Route::get('list', [AdminPermissionController::class, "list"]);
        Route::get('all/from/type', [AdminPermissionController::class, "getTypePermissions"]);
        Route::delete('delete', [AdminPermissionController::class, "delete"]);
    });
});
